package com.study04;

public class Test {
    public static void descCurrentShape(Count c){
        System.out.println("它的周长是：" + c.perimeter() + "； 它的面积是：" + c.area() );
    }
    public static void main(String[] args) {
        double[] arr = {2.0,3.0};
        Rectangle rShape = new Rectangle(arr);
        System.out.println("这是一个"+ rShape.shape + "； 它的周长是：" + rShape.perimeter() + "； 它的面积是：" + rShape.area() );
        //rShape.printArr();
        System.out.println("-----------------------------------------------");

        Circle cShape = new Circle(3.0);
        System.out.println("这是一个"+ cShape.shape + "； 它的周长是：" + cShape.perimeter() + "； 它的面积是：" + cShape.area() );
        System.out.println("-----------------------------------------------");
        /*
            Count shape = new Rectangle();
            System.out.println("它的周长是：" + shape.perimeter() + "； 它的面积是：" + shape.area() );
        */

        descCurrentShape(rShape);
        descCurrentShape(cShape);


    }

}
